package org.springblade.modules.admin.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springblade.common.mq.MqMessageService;
import org.springblade.core.tool.api.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Author ysq
 * @Date 2023/6/19
 **/
@Api(value = "mq消息", tags = "mq消息")
@RestController
@RequestMapping("/admin/mq/message")
public class MqMessageContorller {

	@Autowired
	private MqMessageService mqMessageService;

	@PostMapping("sendMessage")
	@ApiOperation("发送MQ消息")
	public R<Boolean> mqSendMessage(@RequestBody String message) {
		mqMessageService.send(message);
		return R.status(true);
	}
}
